#ifndef AT_NETWORK_SOCKET_URC_STATE_h
#define AT_NETWORK_SOCKET_URC_STATE_h

#include "AtNetworkSocket.h"

#include "AtNetworkUrc.h"

class AtNetworkSocketUrcState : public AtNetworkUrc {
  protected:
    AtNetworkSocket *socket;

  public:
    AtNetworkSocketUrcState(AtNetworkSocket *socket, size_t size) {
      this->urcCmd = (GSM_STRING)MEM_ALLOC(size);

      memset(this->urcCmd, 0, size);

      this->socket = socket;
    };

    ~AtNetworkSocketUrcState() {
      free(this->urcCmd);
    };

    /**
     * URC回调接口函数
     */
    virtual inline void callback(void *param) {
      this->socket->urcWithClose(param);
    };
};

#endif